<template>
  <div>
    <dplayer ref="dplayer" :dplayerData="dplayerData"></dplayer>
  </div>
</template>

<script>
import dplayer from '@/components/dplayer'
export default {
  components: {
    dplayer,
  },
  data() {
    return {
      dplayerData: {
        style:
            'width:100%;height:672px;position: absolute;bottom: 0;right: 0;',
      },
      info: { video: '视频链接', pic: '封面图链接' },
    }
  },
  created() {
    setTimeout(() => {
      this.switchVideo()
    }, 500)
  },
  methods: {
    switchVideo() {
      this.$refs.dplayer.switchVideo(this.info)
    },
  },
}
</script>

<style lang="scss" scoped></style>
